Skip to main content

All Questions

1vote
2answers
154views

Fully generic, very efficient bidirectional Dijkstra's algorithm in Java

After finding out that my previous implementations are incorrect, I decided to give it another try. I relied on this post. (The entire project resides in this GitHub repository. Contains some unit ...
coderodde's user avatar
3votes
3answers
196views

Comparing 8 different Disjoint-Set data structure variants in Java

The Wikipedia page on Disjoint-Set data structures presents \$4\$ distinct algorithms for finding the root node of the tree, and \$2\$ distinct algorithms for performing the union operation. In this ...
coderodde's user avatar
3votes
3answers
461views

A tiny Java library for generating Gray codes

This library is for generating Gray codes. A Gray code over \$n\$ bits is a list of \$2^n\$ different \$n\$-bit strings subject to the following constraint: two adjacent bit string differ in only one ...
coderodde's user avatar
3votes
2answers
625views

Comparing Dijkstra's SSSP algorithm against Bellman-Ford in Java

Single source shortest path In SSSP, we choose a node \$s\$ and we compute all the shortest path starting from \$s\$ towards all other nodes, thus computing a shortest path tree. Two most classical ...
coderodde's user avatar
2votes
1answer
2kviews

Improved brute force SAT solver in Java

(See the previous iteration.) I have this small library for solving the SAT (satisfiability problem) via brute force: we are given a boolean formula, which is a conjuction (...
coderodde's user avatar

close